<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<bean:define id="role" value="${auth.role.roleType}" scope="session" />
<logic:equal name="role" value="admin">
	<html:form action="/planesAction">
		<h1>
			<bean:message key="planes" />
		</h1>
		<table>
			<c:forEach var="pl" items="${planes}">

				<tr>
					<th><html:radio property="planeId" value="${pl.planeId}">${pl.model}</html:radio>
					</th>
				</tr>

			</c:forEach>
		</table>
		<html:errors property="choosePlane" />
		<html:submit property="method">
			<bean:message key="plane.add" />
		</html:submit>
		<html:submit property="method">
			<bean:message key="plane.update" />
		</html:submit>
		<html:submit property="method">
			<bean:message key="plane.delete" />
		</html:submit>
	</html:form>
</logic:equal>